using System;
using FytSoa.Common.Utils;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Car;
using SqlSugar;

namespace FytSoa.Application.Car;

/// <summary>
/// 
/// </summary>
public class CarsPrizeDto
{
    /// <summary>
    /// 唯一编号
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 活动名称
    /// </summary>
    [Required]
    [StringLength(100)]
    public string Name { get; set; }

    /// <summary>
    /// 活动状态
    /// </summary>
    [Required]
    public bool Status { get; set; } = true;

    /// <summary>
    /// 中奖次数
    /// </summary>
    [Required]
    public int PickCount { get; set; } = 0;
    
    /// <summary>
    /// 开始时间
    /// </summary>
    [Required]
    public DateTime StartTime { get; set; } = DateTime.Now;
    
    /// <summary>
    /// 结束时间
    /// </summary>
    [Required]
    public DateTime EndTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 奖品
    /// </summary>
    public List<CarsPrize.CarsPrizeInfo> Prizes { get; set; }
    
    /// <summary>
    /// 设置的抽奖次数
    /// </summary>
    [SugarColumn(IsJson = true)]
    public List<CarsPrize.CarsPrizeUserDraw> DrawNumber { get; set; }
    
    /// <summary>
    /// 活动规则
    /// </summary>
    public string Summary { get; set; }

    /// <summary>
    /// 添加时间
    /// </summary>
    public DateTime CreateTime { get; set; }=DateTime.Now;


}